package com.itCar.base.api.Test;

import com.itCar.base.config.exceptionhandler.BizException;
import com.itCar.base.config.result.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: TestController
 * @Author: hhxx_liuzhiguo
 * @CreateTime: 2023-08-15  09:38
 */
@RestController
@RequestMapping(value = "/test", produces = "application/json")
@Api(tags = "测试类")
public class TestController {

    @PostMapping(value = "/testUserId")
    @ApiOperation(value = "测试用户id isBlank")
    @ResponseBody
    public ResultBody addOrModifyJob(TestVo vo){
        if (!StringUtils.isBlank(String.valueOf(vo.getId()))){
            throw new BizException("用户id不能为空");
        }

        return ResultBody.success("成功");
    }
}
